fix(shared): Add Clerk prefix in deprecation warnings - #1890
Conversation
🦋 Changeset detectedLatest commit: 113c14d The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
||
| console.warn( | ||
| `DEPRECATION WARNING: "${fnName}" is deprecated and will be removed in the next major release.\n${warning}`, | ||
| `DEPRECATION WARNING: Clerk "${fnName}" is deprecated and will be removed in the next major release.\n${warning}`, |
There was a problem hiding this comment.
Maybe something like this or similar?
| `DEPRECATION WARNING: Clerk "${fnName}" is deprecated and will be removed in the next major release.\n${warning}`, | |
| `Clerk - DEPRECATION WARNING: "${fnName}" is deprecated and will be removed in the next major release.\n${warning}`, |
There was a problem hiding this comment.
If we'd want we could get fancy and use something like https://github.com/GoogleChrome/workbox/blob/v7/packages/workbox-core/src/_private/logger.ts
This relates to https://developer.mozilla.org/en-US/docs/Web/API/console#styling_console_output
So we could do:
console.warn('%cClerk', styles.join(';'), 'MESSAGE')There was a problem hiding this comment.
Let's open a discussion in Slack about theming our logs in general and implement it as different PRs.
There was a problem hiding this comment.
@nikosdouvlis i have updated the formatting of the warnings. PTAL
31c6904 to
113c14d
Compare
|
This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Add
Clerkprefix in deprecation warningsChecklist
npm testruns as expected.npm run buildruns as expected.Type of change
Packages affected
@clerk/clerk-js@clerk/clerk-react@clerk/nextjs@clerk/remix@clerk/types@clerk/themes@clerk/localizations@clerk/clerk-expo@clerk/backend@clerk/clerk-sdk-node@clerk/shared@clerk/fastify@clerk/chrome-extensiongatsby-plugin-clerkbuild/tooling/chore